package com.suredy.app.testType.model;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.Table;

import com.suredy.app.testItem.model.TestItem;
import com.suredy.core.model.BaseModel;

@Entity
@Table(name = "T_APP_TESTTYPE")
public class TestType extends BaseModel{
	private String name;
	private String code;
	private String description;
	
	@ManyToMany(cascade={CascadeType.PERSIST,CascadeType.MERGE})  
    @JoinTable(name="T_APP_TYPE_ITEM",joinColumns={@JoinColumn(name="TYPE_ID")},inverseJoinColumns={@JoinColumn(name="ITEM_ID")})  
	private List<TestItem> testItems;
	
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	
	public String getCode() {
		return code;
	}

	
	public void setCode(String code) {
		this.code = code;
	}


	
	
	public String getDescription() {
		return description;
	}

	
	public void setDescription(String description) {
		this.description = description;
	}

	public List<TestItem> getTestItems() {
		return testItems;
	}

	
	public void setTestItems(List<TestItem> testItems) {
		this.testItems = testItems;
	}
	
	

}
